package cn.maxhou.demo.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloKtController {
    @GetMapping("/helloKT")
    public String helloKT(){
        return "Hello,KT!";
    }
    @PostMapping("/helloKT2/{name}")
    public String helloKT2(@PathVariable("name")String name){
        String reversed = new StringBuilder(name).reverse().toString();
        return reversed;
    }
}
